home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / thinkref / archive / THINKPascalUH2.1.sea / THINKPas Univ Hdr 2.1 / Interfaces / GXTypes.p < prev    next >
Text File  |  1995-09-12  |  47KB  |  1,838 lines

  1. { Converted with MPW2TPas Tuesday, September 12, 1995 7:06:53 PM }
  2. {
  3.      File:        GXTypes.p
  4.  
  5.      Contains:    QuickDraw GX object and constant definitions
  6.  
  7.      Version:    Technology:    Quickdraw GX 1.1
  8.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  9.  
  10.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  14.                  stack.  Include the file and version information (from above)
  15.                  in the problem description and send to:
  16.                      Internet:    apple.bugs@applelink.apple.com
  17.                      AppleLink:    APPLE.BUGS
  18.  
  19. }
  20.  
  21.  UNIT GXTypes;
  22.  INTERFACE
  23.  
  24.  
  25. {$IFC UNDEFINED __GXTYPES__}
  26. {$SETC __GXTYPES__ := 1}
  27.  
  28.   USES
  29.    ConditionalMacros, Types, MixedMode, GXMath;
  30.  
  31. { $PUSH}
  32. { $ALIGN MAC68K}
  33. { $LibExport+}
  34. {$SETC graphicsTypesIncludes := 1}
  35.     
  36. TYPE
  37.     gxShape = Ptr;
  38.  
  39.     gxStyle = Ptr;
  40.  
  41.     gxInk = Ptr;
  42.  
  43.     gxTransform = Ptr;
  44.  
  45.     gxTag = Ptr;
  46.  
  47.     gxColorSet = Ptr;
  48.  
  49.     gxColorProfile = Ptr;
  50.  
  51.     gxGraphicsClient = Ptr;
  52.  
  53.     gxViewGroup = Ptr;
  54.  
  55.     gxViewPort = Ptr;
  56.  
  57.     gxViewDevice = Ptr;
  58.  
  59.     gxColorSpace = LONGINT;
  60.  
  61. { gxShape enumerations }
  62.  
  63. CONST
  64.     gxEmptyType                    = 1;
  65.     gxPointType                    = 2;
  66.     gxLineType                    = 3;
  67.     gxCurveType                    = 4;
  68.     gxRectangleType                = 5;
  69.     gxPolygonType                = 6;
  70.     gxPathType                    = 7;
  71.     gxBitmapType                = 8;
  72.     gxTextType                    = 9;
  73.     gxGlyphType                    = 10;
  74.     gxLayoutType                = 11;
  75.     gxFullType                    = 12;
  76.     gxPictureType                = 13;
  77.  
  78.     
  79. TYPE
  80.     gxShapeType = LONGINT;
  81.  
  82.  
  83. CONST
  84.     gxNoFill                    = 0;
  85.     gxOpenFrameFill                = 1;
  86.     gxFrameFill                    = gxOpenFrameFill;
  87.     gxClosedFrameFill            = 2;
  88.     gxHollowFill                = gxClosedFrameFill;
  89.     gxEvenOddFill                = 3;
  90.     gxSolidFill                    = gxEvenOddFill;
  91.     gxWindingFill                = 4;
  92.     gxInverseEvenOddFill        = 5;
  93.     gxInverseSolidFill            = gxInverseEvenOddFill;
  94.     gxInverseFill                = gxInverseEvenOddFill;
  95.     gxInverseWindingFill        = 6;
  96.  
  97.     
  98. TYPE
  99.     gxShapeFill = LONGINT;
  100.  
  101.  
  102. CONST
  103.     gxNoAttributes                = 0;
  104.     gxDirectShape                = $0001;
  105.     gxRemoteShape                = $0002;
  106.     gxCachedShape                = $0004;
  107.     gxLockedShape                = $0008;
  108.     gxGroupShape                = $0010;
  109.     gxMapTransformShape            = $0020;
  110.     gxUniqueItemsShape            = $0040;
  111.     gxIgnorePlatformShape        = $0080;
  112.     gxNoMetricsGridShape        = $0100;
  113.     gxDiskShape                    = $0200;
  114.     gxMemoryShape                = $0400;
  115.  
  116.     
  117. TYPE
  118.     gxShapeAttribute = LONGINT;
  119.  
  120. { gxShape editing enumerations }
  121.  
  122. CONST
  123.     gxBreakNeitherEdit            = 0;
  124.     gxBreakLeftEdit                = $0001;
  125.     gxBreakRightEdit            = $0002;
  126.     gxRemoveDuplicatePointsEdit    = $0004;
  127.  
  128. { if the new first (or last) point exactly matches the point before it in }
  129. { the same contour, then remove it) }
  130.     
  131. TYPE
  132.     gxEditShapeFlag = LONGINT;
  133.  
  134.  
  135. CONST
  136.     gxSelectToEnd                = -1;
  137.  
  138.     gxAnyNumber                    = 1;
  139.     gxSetToNil                    = -1;
  140.  
  141.     gxCounterclockwiseDirection    = 0;
  142.     gxClockwiseDirection        = 1;
  143.  
  144.     
  145. TYPE
  146.     gxContourDirection = LONGINT;
  147.  
  148. { gxShape structures }
  149. { The type 'gxPoint' is defined in "GXMath.h" }
  150.     gxLine = RECORD
  151.         first:                    gxPoint;
  152.         last:                    gxPoint;
  153.     END;
  154.  
  155.     gxCurve = RECORD
  156.         first:                    gxPoint;
  157.         control:                gxPoint;
  158.         last:                    gxPoint;
  159.     END;
  160.  
  161.     gxRectangle = RECORD
  162.         left:                    Fixed;
  163.         top:                    Fixed;
  164.         right:                    Fixed;
  165.         bottom:                    Fixed;
  166.     END;
  167.  
  168.     gxPolygon = RECORD
  169.         vectors:                LONGINT;
  170.         vector:                    ARRAY [0..0] OF gxPoint;
  171.     END;
  172.  
  173.     gxPolygons = RECORD
  174.         contours:                LONGINT;
  175.         contour:                ARRAY [0..0] OF gxPolygon;
  176.     END;
  177.  
  178.     gxPath = RECORD
  179.         vectors:                LONGINT;
  180.         controlBits:            ARRAY [0..0] OF LONGINT;
  181.         vector:                    ARRAY [0..0] OF gxPoint;
  182.     END;
  183.  
  184.     gxPaths = RECORD
  185.         contours:                LONGINT;
  186.         contour:                ARRAY [0..0] OF gxPath;
  187.     END;
  188.  
  189.     gxBitmap = RECORD
  190.         image:                    ^CHAR;                                    { pointer to pixels }
  191.         width:                    LONGINT;                                { width in pixels }
  192.         height:                    LONGINT;                                { height in pixels }
  193.         rowBytes:                LONGINT;                                { width in bytes }
  194.         pixelSize:                LONGINT;                                { physical bits per pixel }
  195.         space:                    gxColorSpace;
  196.         colorSet:                gxColorSet;
  197.         profile:                gxColorProfile;
  198.     END;
  199.  
  200.     gxLongRectangle = RECORD
  201.         left:                    LONGINT;
  202.         top:                    LONGINT;
  203.         right:                    LONGINT;
  204.         bottom:                    LONGINT;
  205.     END;
  206.  
  207. { gxStyle enumerations }
  208.  
  209. CONST
  210.     gxCenterFrameStyle            = 0;
  211.     gxSourceGridStyle            = $0001;
  212.     gxDeviceGridStyle            = $0002;
  213.     gxInsideFrameStyle            = $0004;
  214.     gxOutsideFrameStyle            = $0008;
  215.     gxAutoInsetStyle            = $0010;
  216.  
  217.     
  218. TYPE
  219.     gxStyleAttribute = LONGINT;
  220.  
  221.  
  222. CONST
  223.     gxBendDash                    = $0001;
  224.     gxBreakDash                    = $0002;
  225.     gxClipDash                    = $0004;
  226.     gxLevelDash                    = $0008;
  227.     gxAutoAdvanceDash            = $0010;
  228.  
  229.     
  230. TYPE
  231.     gxDashAttribute = LONGINT;
  232.  
  233.  
  234. CONST
  235.     gxPortAlignPattern            = $0001;
  236.     gxPortMapPattern            = $0002;
  237.  
  238.     
  239. TYPE
  240.     gxPatternAttribute = LONGINT;
  241.  
  242.  
  243. CONST
  244.     gxSharpJoin                    = $0000;
  245.     gxCurveJoin                    = $0001;
  246.     gxLevelJoin                    = $0002;
  247.  
  248.     
  249. TYPE
  250.     gxJoinAttribute = LONGINT;
  251.  
  252.  
  253. CONST
  254.     gxLevelStartCap                = $0001;
  255.     gxLevelEndCap                = $0002;
  256.  
  257.     
  258. TYPE
  259.     gxCapAttribute = LONGINT;
  260.  
  261.  
  262. CONST
  263.     gxAutoAdvanceText            = $0001;
  264.     gxNoContourGridText            = $0002;
  265.     gxNoMetricsGridText            = $0004;
  266.     gxAnchorPointsText            = $0008;
  267.     gxVerticalText                = $0010;
  268.     gxNoOpticalScaleText        = $0020;
  269.  
  270.     
  271. TYPE
  272.     gxTextAttribute = LONGINT;
  273.  
  274.  
  275. CONST
  276.     gxLeftJustify                = 0;
  277.     gxCenterJustify                = $20000000;
  278.     gxRightJustify                = $40000000;
  279.     gxFillJustify                = -1;
  280.  
  281.     gxUnderlineAdvanceLayer        = $0001;                        { a gxLine is drawn through the advances }
  282.     gxSkipWhiteSpaceLayer        = $0002;                        { except characters describing white space }
  283.     gxUnderlineIntervalLayer    = $0004;                        { (+ gxStringLayer) a gxLine is drawn through the gaps between advances }
  284.     gxUnderlineContinuationLayer = $0008;                        { (+ gxStringLayer) join this underline with another face }
  285.     gxWhiteLayer                = $0010;                        { the layer draws to white instead of black }
  286.     gxClipLayer                    = $0020;                        { the characters define a clip }
  287.     gxStringLayer                = $0040;                        { all characters in run are combined }
  288.  
  289.     
  290. TYPE
  291.     gxLayerFlag = LONGINT;
  292.  
  293. { gxStyle structures }
  294.     gxFaceLayer = RECORD
  295.         outlineFill:            gxShapeFill;                            { outline framed or filled }
  296.         flags:                    gxLayerFlag;                            { various additional effects }
  297.         outlineStyle:            gxStyle;                                { outline }
  298.         outlineTransform:        gxTransform;                            { italic, condense, extend }
  299.         boldOutset:                gxPoint;                                { bold }
  300.     END;
  301.  
  302.     gxTextFace = RECORD
  303.         faceLayers:                LONGINT;                                { layer to implement shadow }
  304.         advanceMapping:            gxMapping;                                { algorithmic change to advance width }
  305.         faceLayer:                ARRAY [0..0] OF gxFaceLayer;            { zero or more face layers describing the face }
  306.     END;
  307.  
  308.     gxJoinRecord = RECORD
  309.         attributes:                gxJoinAttribute;
  310.         join:                    gxShape;
  311.         miter:                    Fixed;
  312.     END;
  313.  
  314.     gxDashRecord = RECORD
  315.         attributes:                gxDashAttribute;
  316.         dash:                    gxShape;                                { similar to pattern, except rotated to gxLine slope }
  317.         advance:                Fixed;                                    { specifies repeating frequency of dash }
  318.         phase:                    Fract;                                    { specifies offset into the gxPath to start dashing }
  319.         scale:                    Fixed;                                    { specifies height of dash to be mapped to penWidth }
  320.     END;
  321.  
  322.     gxPatternRecord = RECORD
  323.         attributes:                gxPatternAttribute;
  324.         pattern:                gxShape;
  325.         u:                        gxPoint;
  326.         v:                        gxPoint;
  327.     END;
  328.  
  329.     gxCapRecord = RECORD
  330.         attributes:                gxCapAttribute;
  331.         startCap:                gxShape;
  332.         endCap:                    gxShape;
  333.     END;
  334.  
  335. { gxInk enumerations }
  336.  
  337. CONST
  338.     gxPortAlignDitherInk        = $0001;
  339.     gxForceDitherInk            = $0002;
  340.     gxSuppressDitherInk            = $0004;
  341.     gxSuppressHalftoneInk        = $0008;
  342.  
  343.     
  344. TYPE
  345.     gxInkAttribute = LONGINT;
  346.  
  347.  
  348. CONST
  349.     gxNoMode                    = 0;
  350.     gxCopyMode                    = 1;
  351.     gxAddMode                    = 2;
  352.     gxBlendMode                    = 3;
  353.     gxMigrateMode                = 4;
  354.     gxMinimumMode                = 5;
  355.     gxMaximumMode                = 6;
  356.     gxHighlightMode                = 7;
  357.     gxAndMode                    = 8;
  358.     gxOrMode                    = 9;
  359.     gxXorMode                    = 10;
  360.     gxRampAndMode                = 11;
  361.     gxRampOrMode                = 12;
  362.     gxRampXorMode                = 13;
  363.     gxOverMode                    = 14;                            { Alpha channel modes                }
  364.     gxAtopMode                    = 15;                            { Note: In England = Beta channel modes        }
  365.     gxExcludeMode                = 16;
  366.     gxFadeMode                    = 17;
  367.  
  368.     
  369. TYPE
  370.     gxComponentMode = SInt8;
  371.  
  372.  
  373. CONST
  374.     gxRejectSourceTransfer        = $0001;                        { at least one component must be out of range        }
  375.     gxRejectDeviceTransfer        = $0002;                        { at least one component must be out of range        }
  376.     gxSingleComponentTransfer    = $0004;                        { duplicate gxTransferComponent[0] for all components in transfer }
  377.  
  378.     
  379. TYPE
  380.     gxTransferFlag = LONGINT;
  381.  
  382.  
  383. CONST
  384.     gxOverResultComponent        = $01;                            { & result gxColor with 0xFFFF before clamping    }
  385.     gxReverseComponent            = $02;                            { reverse source and device before moding        }
  386.  
  387.     
  388. TYPE
  389.     gxComponentFlag = SInt8;
  390.  
  391.     gxTransferComponent = RECORD
  392.         mode:                    gxComponentMode;                        { how the component is operated upon }
  393.         flags:                    gxComponentFlag;                        { flags for each component    }
  394.         sourceMinimum:            gxColorValue;
  395.         sourceMaximum:            gxColorValue;                            { input filter range }
  396.         deviceMinimum:            gxColorValue;
  397.         deviceMaximum:            gxColorValue;                            { output filter range }
  398.         clampMinimum:            gxColorValue;
  399.         clampMaximum:            gxColorValue;                            { output clamping range }
  400.         operand:                gxColorValue;                            { ratio for blend, step for migrate, gxColor for highlight    }
  401.     END;
  402.  
  403.     gxTransferMode = RECORD
  404.         space:                    gxColorSpace;                            { the gxColor-space the transfer mode is to operate in    }
  405.         colorSet:                gxColorSet;
  406.         profile:                gxColorProfile;
  407.         sourceMatrix:            ARRAY [0..4,0..3] OF Fixed;
  408.         deviceMatrix:            ARRAY [0..4,0..3] OF Fixed;
  409.         resultMatrix:            ARRAY [0..4,0..3] OF Fixed;
  410.         flags:                    gxTransferFlag;
  411.         component:                ARRAY [0..3] OF gxTransferComponent;    { how each component is operated upon            }
  412.     END;
  413.  
  414. { gxColor space enumerations }
  415.  
  416. CONST
  417.     gxNoColorPacking            = $0000;                        { 16 bits per channel }
  418.     gxAlphaSpace                = $0080;                        { space includes alpha channel }
  419.     gxWord5ColorPacking            = $0500;                        { 5 bits per channel, right-justified }
  420.     gxLong8ColorPacking            = $0800;                        { 8 bits per channel, right-justified }
  421.     gxLong10ColorPacking        = $0a00;                        { 10 bits per channel, right-justified }
  422.     gxAlphaFirstPacking            = $1000;                        { alpha channel is the first field in the packed space }
  423.  
  424.     gxNoSpace                    = 0;
  425.     gxRGBSpace                    = 1;
  426.     gxCMYKSpace                    = 2;
  427.     gxHSVSpace                    = 3;
  428.     gxHLSSpace                    = 4;
  429.     gxYXYSpace                    = 5;
  430.     gxXYZSpace                    = 6;
  431.     gxLUVSpace                    = 7;
  432.     gxLABSpace                    = 8;
  433.     gxYIQSpace                    = 9;
  434.     gxNTSCSpace                    = gxYIQSpace;
  435.     gxPALSpace                    = gxYIQSpace;
  436.     gxGraySpace                    = 10;
  437.     gxIndexedSpace                = 11;
  438.     gxRGBASpace                    = $81;
  439.     gxGrayASpace                = $8A;
  440.     gxRGB16Space                = $501;
  441.     gxRGB32Space                = $801;
  442.     gxARGB32Space                = $1881;
  443.     gxCMYK32Space                = $802;
  444.     gxHSV32Space                = $A03;
  445.     gxHLS32Space                = $A04;
  446.     gxYXY32Space                = $A05;
  447.     gxXYZ32Space                = $A06;
  448.     gxLUV32Space                = $A07;
  449.     gxLAB32Space                = $A08;
  450.     gxYIQ32Space                = $A09;
  451.     gxNTSC32Space                = gxYIQ32Space;
  452.     gxPAL32Space                = gxYIQ32Space;
  453.  
  454. { gxColor space structures }
  455.  
  456. TYPE
  457.     gxRGBColor = RECORD
  458.         red:                    gxColorValue;
  459.         green:                    gxColorValue;
  460.         blue:                    gxColorValue;
  461.     END;
  462.  
  463.     gxRGBAColor = RECORD
  464.         red:                    gxColorValue;
  465.         green:                    gxColorValue;
  466.         blue:                    gxColorValue;
  467.         alpha:                    gxColorValue;
  468.     END;
  469.  
  470.     gxHSVColor = RECORD
  471.         hue:                    gxColorValue;
  472.         saturation:                gxColorValue;
  473.         value:                    gxColorValue;
  474.     END;
  475.  
  476.     gxHLSColor = RECORD
  477.         hue:                    gxColorValue;
  478.         lightness:                gxColorValue;
  479.         saturation:                gxColorValue;
  480.     END;
  481.  
  482.     gxCMYKColor = RECORD
  483.         cyan:                    gxColorValue;
  484.         magenta:                gxColorValue;
  485.         yellow:                    gxColorValue;
  486.         black:                    gxColorValue;
  487.     END;
  488.  
  489.     gxXYZColor = RECORD
  490.         x:                        gxColorValue;
  491.         y:                        gxColorValue;
  492.         z:                        gxColorValue;
  493.     END;
  494.  
  495.     gxYXYColor = RECORD
  496.         capY:                    gxColorValue;
  497.         x:                        gxColorValue;
  498.         y:                        gxColorValue;
  499.     END;
  500.  
  501.     gxLUVColor = RECORD
  502.         l:                        gxColorValue;
  503.         u:                        gxColorValue;
  504.         v:                        gxColorValue;
  505.     END;
  506.  
  507.     gxLABColor = RECORD
  508.         l:                        gxColorValue;
  509.         a:                        gxColorValue;
  510.         b:                        gxColorValue;
  511.     END;
  512.  
  513.     gxYIQColor = RECORD
  514.         y:                        gxColorValue;
  515.         i:                        gxColorValue;
  516.         q:                        gxColorValue;
  517.     END;
  518.  
  519.     gxGrayAColor = RECORD
  520.         gray:                    gxColorValue;
  521.         alpha:                    gxColorValue;
  522.     END;
  523.  
  524.     gxColorIndex = LONGINT;
  525.  
  526.     gxIndexedColor = RECORD
  527.         index:                    gxColorIndex;
  528.         colorSet:                gxColorSet;
  529.     END;
  530.  
  531.     gxColor = RECORD
  532.         space:                    gxColorSpace;
  533.         profile:                gxColorProfile;
  534.         CASE INTEGER OF
  535.         0: (
  536.             cmyk:                        gxCMYKColor;
  537.            );
  538.         1: (
  539.             rgb:                        gxRGBColor;
  540.            );
  541.         2: (
  542.             rgba:                        gxRGBAColor;
  543.            );
  544.         3: (
  545.             hsv:                        gxHSVColor;
  546.            );
  547.         4: (
  548.             hls:                        gxHLSColor;
  549.            );
  550.         5: (
  551.             xyz:                        gxXYZColor;
  552.            );
  553.         6: (
  554.             yxy:                        gxYXYColor;
  555.            );
  556.         7: (
  557.             luv:                        gxLUVColor;
  558.            );
  559.         8: (
  560.             lab:                        gxLABColor;
  561.            );
  562.         9: (
  563.             yiq:                        gxYIQColor;
  564.            );
  565.         10: (
  566.             gray:                        gxColorValue;
  567.            );
  568.         11: (
  569.             graya:                        gxGrayAColor;
  570.            );
  571.         12: (
  572.             pixel16:                    INTEGER;
  573.            );
  574.         13: (
  575.             pixel32:                    LONGINT;
  576.            );
  577.         14: (
  578.             indexed:                    gxIndexedColor;
  579.            );
  580.         15: (
  581.             component:                    ARRAY [0..3] OF gxColorValue;
  582.            );
  583.  
  584.     END;
  585.  
  586. { gxColorSet structures }
  587.     gxSetColor = RECORD
  588.         CASE INTEGER OF
  589.         0: (
  590.             cmyk:                        gxCMYKColor;
  591.            );
  592.         1: (
  593.             rgb:                        gxRGBColor;
  594.            );
  595.         2: (
  596.             rgba:                        gxRGBAColor;
  597.            );
  598.         3: (
  599.             hsv:                        gxHSVColor;
  600.            );
  601.         4: (
  602.             hls:                        gxHLSColor;
  603.            );
  604.         5: (
  605.             xyz:                        gxXYZColor;
  606.            );
  607.         6: (
  608.             yxy:                        gxYXYColor;
  609.            );
  610.         7: (
  611.             luv:                        gxLUVColor;
  612.            );
  613.         8: (
  614.             lab:                        gxLABColor;
  615.            );
  616.         9: (
  617.             yiq:                        gxYIQColor;
  618.            );
  619.         10: (
  620.             gray:                        gxColorValue;
  621.            );
  622.         11: (
  623.             graya:                        gxGrayAColor;
  624.            );
  625.         12: (
  626.             pixel16:                    INTEGER;
  627.            );
  628.         13: (
  629.             pixel32:                    LONGINT;
  630.            );
  631.         14: (
  632.             component:                    ARRAY [0..3] OF gxColorValue;
  633.            );
  634.     END;
  635.  
  636. { gxTransform enumerations }
  637. { parts of a gxShape considered in hit testing: }
  638.  
  639. CONST
  640.     gxNoPart                    = 0;                            { (in order of evaluation) }
  641.     gxBoundsPart                = $0001;
  642.     gxGeometryPart                = $0002;
  643.     gxPenPart                    = $0004;
  644.     gxCornerPointPart            = $0008;
  645.     gxControlPointPart            = $0010;
  646.     gxEdgePart                    = $0020;
  647.     gxJoinPart                    = $0040;
  648.     gxStartCapPart                = $0080;
  649.     gxEndCapPart                = $0100;
  650.     gxDashPart                    = $0200;
  651.     gxPatternPart                = $0400;
  652.     gxGlyphBoundsPart            = gxJoinPart;
  653.     gxGlyphFirstPart            = gxStartCapPart;
  654.     gxGlyphLastPart                = gxEndCapPart;
  655.     gxSideBearingPart            = gxDashPart;
  656.     gxAnyPart                    = $7FF;
  657.  
  658.     
  659. TYPE
  660.     gxShapePart = LONGINT;
  661.  
  662. { gxTransform structures }
  663.     gxHitTestInfo = RECORD
  664.         what:                    gxShapePart;                            { which part of gxShape }
  665.         index:                    LONGINT;                                { control gxPoint index }
  666.         distance:                Fixed;                                    { how far from gxPoint or outside of area click was }
  667.         { these fields are only set by GXHitTestPicture }
  668.         which:                    gxShape;
  669.         containerPicture:        gxShape;                                { picture which contains gxShape hit }
  670.         containerIndex:            LONGINT;                                { the index within that picture  }
  671.         totalIndex:                LONGINT;                                { the total index within the root picture }
  672.     END;
  673.  
  674. { gxViewPort enumerations }
  675.  
  676. CONST
  677.     gxGrayPort                    = $0001;
  678.     gxAlwaysGridPort            = $0002;
  679.     gxEnableMatchPort            = $0004;
  680.  
  681.     
  682. TYPE
  683.     gxPortAttribute = LONGINT;
  684.  
  685. { gxViewDevice enumerations }
  686.  
  687. CONST
  688.     gxDirectDevice                = $01;                            { for the device gxBitmap baseAddr pointer }
  689.     gxRemoteDevice                = $02;
  690.     gxInactiveDevice            = $04;
  691.  
  692.     
  693. TYPE
  694.     gxDeviceAttribute = LONGINT;
  695.  
  696.  
  697. CONST
  698.     gxRoundDot                    = 1;
  699.     gxSpiralDot                    = 2;
  700.     gxSquareDot                    = 3;
  701.     gxLineDot                    = 4;
  702.     gxEllipticDot                = 5;
  703.     gxTriangleDot                = 6;
  704.     gxDispersedDot                = 7;
  705.     gxCustomDot                    = 8;
  706.  
  707.     
  708. TYPE
  709.     gxDotType = LONGINT;
  710.  
  711. { gxViewPort structures }
  712.  
  713. CONST
  714.     gxNoTint                    = 0;
  715.     gxLuminanceTint                = 1;                            { use the luminance of the gxColor }
  716.     gxAverageTint                = 2;                            { add all the components and divide by the number of components }
  717.     gxMixtureTint                = 3;                            { find the closest gxColor on the axis between the foreground and background }
  718.     gxComponent1Tint            = 4;                            { use the value of the first component of the gxColor }
  719.     gxComponent2Tint            = 5;                            { ... etc. }
  720.     gxComponent3Tint            = 6;
  721.     gxComponent4Tint            = 7;
  722.  
  723.     
  724. TYPE
  725.     gxTintType = LONGINT;
  726.  
  727.     gxHalftone = RECORD
  728.         angle:                    Fixed;
  729.         frequency:                Fixed;
  730.         method:                    gxDotType;
  731.         tinting:                gxTintType;
  732.         dotColor:                gxColor;
  733.         backgroundColor:        gxColor;
  734.         tintSpace:                gxColorSpace;
  735.     END;
  736.  
  737.     gxHalftoneMatrix = RECORD
  738.         dpiX:                    Fixed;                                    { intended resolution }
  739.         dpiY:                    Fixed;
  740.         width:                    LONGINT;                                { width of matrix (in device pixels) }
  741.         height:                    LONGINT;                                { height of matrix (in device pixels) }
  742.         tileShift:                LONGINT;                                { shift amount (in samples) for rectangular tiling }
  743.         samples:                ARRAY [0..0] OF INTEGER;                { samples from 0..MAX(halftone tintSpace) }
  744.     END;
  745.  
  746. { gxViewGroup enumerations }
  747.  
  748. CONST
  749.     gxAllViewDevices            = 0;
  750.     gxScreenViewDevices            = 1;
  751.  
  752.     gxOpenReadSpool                = 1;
  753.     gxOpenWriteSpool            = 2;
  754.     gxReadSpool                    = 3;
  755.     gxWriteSpool                = 4;
  756.     gxCloseSpool                = 5;
  757.  
  758.     
  759. TYPE
  760.     gxSpoolCommand = LONGINT;
  761.  
  762.     gxGraphicsOpcode = SInt8;
  763.  
  764.     gxSpoolProcPtr = ProcPtr;  { FUNCTION gxSpool(command: gxSpoolCommand; VAR block: gxSpoolBlock): LONGINT; }
  765.     gxSpoolUPP = UniversalProcPtr;
  766.  
  767.     gxSpoolBlock = RECORD
  768.         spoolProcedure:            gxSpoolUPP;                                { these fields are read only }
  769.         buffer:                    Ptr;                                    { source/destination pointer to data }
  770.         bufferSize:                LONGINT;                                { how many bytes for the system to read (flatten) / write (unflatten) }
  771.         { these fields are written to (but are not read from) }
  772.         count:                    LONGINT;                                { how many bytes for the caller to read (unflatten) /write (flatten) }
  773.         operationSize:            LONGINT;                                { operation size (including operand byte) }
  774.         operationOffset:        LONGINT;                                { the data offset, if any, within the current operation }
  775.         lastTypeOpcode:            gxGraphicsOpcode;                        { type of last created object }
  776.         currentOperation:        gxGraphicsOpcode;                        { operation emitted by flatten, or intrepreted by last unflatten }
  777.         currentOperand:            gxGraphicsOpcode;                        { e.g., gxTransformTypeOpcode, gxInkTagOpcode }
  778.         compressed:                SInt8; { unsigned char }                { one of: gxTwoBitCompressionValues }
  779.     END;
  780.  
  781.  
  782. CONST
  783.     uppgxSpoolProcInfo = $000003F1; { FUNCTION (4 byte param, 4 byte param): 4 byte result; }
  784.  
  785. FUNCTION NewgxSpoolProc(userRoutine: gxSpoolProcPtr): gxSpoolUPP;
  786.     {$IFC NOT GENERATINGCFM }
  787.     INLINE $2E9F;
  788.     {$ENDC}
  789.  
  790. FUNCTION CallgxSpoolProc(command: gxSpoolCommand; VAR block: gxSpoolBlock; userRoutine: gxSpoolUPP): LONGINT;
  791.     {$IFC NOT GENERATINGCFM}
  792.     INLINE $205F, $4E90;
  793.     {$ENDC}
  794.  
  795. CONST
  796.     gxFontListFlatten            = $01;                            { if set, generate a gxTag containing list of each gxFont referenced }
  797.     gxFontGlyphsFlatten            = $02;                            { if set, generate a gxTag containing the list of glyphs referenced inside the gxFont }
  798.     gxFontVariationsFlatten        = $04;                            { if set, append the gxTag with separate [variation] coordinates }
  799.     gxBitmapAliasFlatten        = $08;                            { if set, open bitmap alias files and flatten out their image data }
  800.  
  801.     
  802. TYPE
  803.     gxFlattenFlag = LONGINT;
  804.  
  805. { gxGraphicsClient constants }
  806.  
  807. CONST
  808.     gxGraphicsSystemClient        = -1;
  809.  
  810.     gxStaticHeapClient            = $0001;
  811.  
  812.     
  813. TYPE
  814.     gxClientAttribute = LONGINT;
  815.  
  816. { graphics patching constants }
  817.  
  818. CONST
  819.     gxOriginalGraphicsFunction    = -1;
  820.     gxOriginalGraphicsIdentifier = 'grfx';
  821.  
  822.  
  823. TYPE
  824.     gxBitmapDataSourceAlias = RECORD
  825.         fileOffset:                LONGINT;                                { file offset (in bytes) of top-left pixel }
  826.         aliasRecordSize:        LONGINT;                                { size of alias record below }
  827.         aliasRecord:            ARRAY [0..0] OF SInt8; { unsigned char } { the actual alias record data }
  828.     END;
  829.  
  830.  
  831. CONST
  832.     gxBitmapFileAliasTagType    = 'bfil';
  833.     gxBitmapFileAliasImageValue    = 1;
  834.  
  835. {$SETC fontTypesIncludes := 1}
  836.     
  837. TYPE
  838.     gxFont = ^Ptr;
  839.  
  840.  
  841. CONST
  842.     gxNoPlatform                = 0;
  843.     gxNoScript                    = 0;
  844.     gxNoLanguage                = 0;
  845.     gxNoFontName                = 0;
  846.     gxGlyphPlatform                = -1;
  847.  
  848.     gxUnicodePlatform            = 1;
  849.     gxMacintoshPlatform            = 2;
  850.     gxReservedPlatform            = 3;
  851.     gxMicrosoftPlatform            = 4;
  852.     gxCustomPlatform            = 5;
  853.  
  854.     
  855. TYPE
  856.     gxFontPlatform = LONGINT;
  857.  
  858.  
  859. CONST
  860.     gxUnicodeDefaultSemantics    = 1;
  861.     gxUnicodeV1_1Semantics        = 2;
  862.     gxISO10646_1993Semantics    = 3;
  863.  
  864.     gxRomanScript                = 1;
  865.     gxJapaneseScript            = 2;
  866.     gxTraditionalChineseScript    = 3;
  867.     gxChineseScript                = gxTraditionalChineseScript;
  868.     gxKoreanScript                = 4;
  869.     gxArabicScript                = 5;
  870.     gxHebrewScript                = 6;
  871.     gxGreekScript                = 7;
  872.     gxCyrillicScript            = 8;
  873.     gxRussian                    = gxCyrillicScript;
  874.     gxRSymbolScript                = 9;
  875.     gxDevanagariScript            = 10;
  876.     gxGurmukhiScript            = 11;
  877.     gxGujaratiScript            = 12;
  878.     gxOriyaScript                = 13;
  879.     gxBengaliScript                = 14;
  880.     gxTamilScript                = 15;
  881.     gxTeluguScript                = 16;
  882.     gxKannadaScript                = 17;
  883.     gxMalayalamScript            = 18;
  884.     gxSinhaleseScript            = 19;
  885.     gxBurmeseScript                = 20;
  886.     gxKhmerScript                = 21;
  887.     gxThaiScript                = 22;
  888.     gxLaotianScript                = 23;
  889.     gxGeorgianScript            = 24;
  890.     gxArmenianScript            = 25;
  891.     gxSimpleChineseScript        = 26;
  892.     gxTibetanScript                = 27;
  893.     gxMongolianScript            = 28;
  894.     gxGeezScript                = 29;
  895.     gxEthiopicScript            = gxGeezScript;
  896.     gxAmharicScript                = gxGeezScript;
  897.     gxSlavicScript                = 30;
  898.     gxEastEuropeanRomanScript    = gxSlavicScript;
  899.     gxVietnameseScript            = 31;
  900.     gxExtendedArabicScript        = 32;
  901.     gxSindhiScript                = gxExtendedArabicScript;
  902.     gxUninterpretedScript        = 33;
  903.  
  904.     gxMicrosoftSymbolScript        = 1;
  905.     gxMicrosoftStandardScript    = 2;
  906.  
  907.     gxCustom8BitScript            = 1;
  908.     gxCustom816BitScript        = 2;
  909.     gxCustom16BitScript            = 3;
  910.  
  911.     
  912. TYPE
  913.     gxFontScript = LONGINT;
  914.  
  915.  
  916. CONST
  917.     gxEnglishLanguage            = 1;
  918.     gxFrenchLanguage            = 2;
  919.     gxGermanLanguage            = 3;
  920.     gxItalianLanguage            = 4;
  921.     gxDutchLanguage                = 5;
  922.     gxSwedishLanguage            = 6;
  923.     gxSpanishLanguage            = 7;
  924.     gxDanishLanguage            = 8;
  925.     gxPortugueseLanguage        = 9;
  926.     gxNorwegianLanguage            = 10;
  927.     gxHebrewLanguage            = 11;
  928.     gxJapaneseLanguage            = 12;
  929.     gxArabicLanguage            = 13;
  930.     gxFinnishLanguage            = 14;
  931.     gxGreekLanguage                = 15;
  932.     gxIcelandicLanguage            = 16;
  933.     gxMalteseLanguage            = 17;
  934.     gxTurkishLanguage            = 18;
  935.     gxCroatianLanguage            = 19;
  936.     gxTradChineseLanguage        = 20;
  937.     gxUrduLanguage                = 21;
  938.     gxHindiLanguage                = 22;
  939.     gxThaiLanguage                = 23;
  940.     gxKoreanLanguage            = 24;
  941.     gxLithuanianLanguage        = 25;
  942.     gxPolishLanguage            = 26;
  943.     gxHungarianLanguage            = 27;
  944.     gxEstonianLanguage            = 28;
  945.     gxLettishLanguage            = 29;
  946.     gxLatvianLanguage            = gxLettishLanguage;
  947.     gxSaamiskLanguage            = 30;
  948.     gxLappishLanguage            = gxSaamiskLanguage;
  949.     gxFaeroeseLanguage            = 31;
  950.     gxFarsiLanguage                = 32;
  951.     gxPersianLanguage            = gxFarsiLanguage;
  952.     gxRussianLanguage            = 33;
  953.     gxSimpChineseLanguage        = 34;
  954.     gxFlemishLanguage            = 35;
  955.     gxIrishLanguage                = 36;
  956.     gxAlbanianLanguage            = 37;
  957.     gxRomanianLanguage            = 38;
  958.     gxCzechLanguage                = 39;
  959.     gxSlovakLanguage            = 40;
  960.     gxSlovenianLanguage            = 41;
  961.     gxYiddishLanguage            = 42;
  962.     gxSerbianLanguage            = 43;
  963.     gxMacedonianLanguage        = 44;
  964.     gxBulgarianLanguage            = 45;
  965.     gxUkrainianLanguage            = 46;
  966.     gxByelorussianLanguage        = 47;
  967.     gxUzbekLanguage                = 48;
  968.     gxKazakhLanguage            = 49;
  969.     gxAzerbaijaniLanguage        = 50;
  970.     gxAzerbaijanArLanguage        = 51;
  971.     gxArmenianLanguage            = 52;
  972.     gxGeorgianLanguage            = 53;
  973.     gxMoldavianLanguage            = 54;
  974.     gxKirghizLanguage            = 55;
  975.     gxTajikiLanguage            = 56;
  976.     gxTurkmenLanguage            = 57;
  977.     gxMongolianLanguage            = 58;
  978.     gxMongolianCyrLanguage        = 59;
  979.     gxPashtoLanguage            = 60;
  980.     gxKurdishLanguage            = 61;
  981.     gxKashmiriLanguage            = 62;
  982.     gxSindhiLanguage            = 63;
  983.     gxTibetanLanguage            = 64;
  984.     gxNepaliLanguage            = 65;
  985.     gxSanskritLanguage            = 66;
  986.     gxMarathiLanguage            = 67;
  987.     gxBengaliLanguage            = 68;
  988.     gxAssameseLanguage            = 69;
  989.     gxGujaratiLanguage            = 70;
  990.     gxPunjabiLanguage            = 71;
  991.     gxOriyaLanguage                = 72;
  992.     gxMalayalamLanguage            = 73;
  993.     gxKannadaLanguage            = 74;
  994.     gxTamilLanguage                = 75;
  995.     gxTeluguLanguage            = 76;
  996.     gxSinhaleseLanguage            = 77;
  997.     gxBurmeseLanguage            = 78;
  998.     gxKhmerLanguage                = 79;
  999.     gxLaoLanguage                = 80;
  1000.     gxVietnameseLanguage        = 81;
  1001.     gxIndonesianLanguage        = 82;
  1002.     gxTagalogLanguage            = 83;
  1003.     gxMalayRomanLanguage        = 84;
  1004.     gxMalayArabicLanguage        = 85;
  1005.     gxAmharicLanguage            = 86;
  1006.     gxTigrinyaLanguage            = 87;
  1007.     gxGallaLanguage                = 88;
  1008.     gxOromoLanguage                = gxGallaLanguage;
  1009.     gxSomaliLanguage            = 89;
  1010.     gxSwahiliLanguage            = 90;
  1011.     gxRuandaLanguage            = 91;
  1012.     gxRundiLanguage                = 92;
  1013.     gxChewaLanguage                = 93;
  1014.     gxMalagasyLanguage            = 94;
  1015.     gxEsperantoLanguage            = 95;
  1016.     gxWelshLanguage                = 129;
  1017.     gxBasqueLanguage            = 130;
  1018.     gxCatalanLanguage            = 131;
  1019.     gxLatinLanguage                = 132;
  1020.     gxQuechuaLanguage            = 133;
  1021.     gxGuaraniLanguage            = 134;
  1022.     gxAymaraLanguage            = 135;
  1023.     gxTatarLanguage                = 136;
  1024.     gxUighurLanguage            = 137;
  1025.     gxDzongkhaLanguage            = 138;
  1026.     gxJavaneseRomLanguage        = 139;
  1027.     gxSundaneseRomLanguage        = 140;
  1028.  
  1029.     
  1030. TYPE
  1031.     gxFontLanguage = LONGINT;
  1032.  
  1033.  
  1034. CONST
  1035.     gxCopyrightFontName            = 1;
  1036.     gxFamilyFontName            = 2;
  1037.     gxStyleFontName                = 3;
  1038.     gxUniqueFontName            = 4;
  1039.     gxFullFontName                = 5;
  1040.     gxVersionFontName            = 6;
  1041.     gxPostscriptFontName        = 7;
  1042.     gxTrademarkFontName            = 8;
  1043.     gxManufacturerFontName        = 9;
  1044.     gxLastReservedFontName        = 256;
  1045.  
  1046.     
  1047. TYPE
  1048.     gxFontName = LONGINT;
  1049.  
  1050.     gxFontTableTag = LONGINT;
  1051.  
  1052.     gxFontVariationTag = LONGINT;
  1053.  
  1054.     gxFontFormatTag = LONGINT;
  1055.  
  1056.     gxFontStorageTag = LONGINT;
  1057.  
  1058.     gxFontDescriptorTag = gxFontVariationTag;
  1059.  
  1060.     gxFontVariation = RECORD
  1061.         name:                    gxFontVariationTag;
  1062.         value:                    Fixed;
  1063.     END;
  1064.  
  1065.     gxFontDescriptor = gxFontVariation;
  1066.  
  1067.     gxFontFeatureSetting = RECORD
  1068.         setting:                INTEGER;
  1069.         nameID:                    INTEGER;
  1070.     END;
  1071.  
  1072.  
  1073. CONST
  1074.     gxSystemFontAttribute        = $0001;
  1075.     gxReadOnlyFontAttribute        = $0002;
  1076.  
  1077.     
  1078. TYPE
  1079.     gxFontAttribute = LONGINT;
  1080.  
  1081.  
  1082. CONST
  1083.     gxMutuallyExclusiveFeature    = $00008000;
  1084.  
  1085.     
  1086. TYPE
  1087.     gxFontFeatureFlag = LONGINT;
  1088.  
  1089.     gxFontFeature = LONGINT;
  1090.  
  1091.  
  1092. CONST
  1093.     gxResourceFontStorage        = 'rsrc';
  1094.     gxHandleFontStorage            = 'hndl';
  1095.     gxFileFontStorage            = 'bass';
  1096.     gxNfntFontStorage            = 'nfnt';
  1097.  
  1098.     
  1099. TYPE
  1100.     gxFontStorageReference = Ptr;
  1101.  
  1102. {$SETC layoutTypesIncludes := 1}
  1103.     gxGlyphcode = INTEGER;
  1104.  
  1105. { single glyph in a font }
  1106. { byte offset within backing store }
  1107.     gxByteOffset = LONGINT;
  1108.  
  1109. { The actual constants for feature types and selectors have been moved to a library. }
  1110.     gxRunFeatureType = INTEGER;
  1111.  
  1112.     gxRunFeatureSelector = INTEGER;
  1113.  
  1114. { If tracking is not desired, specify the following value in the track field in the
  1115.         gxRunControls record (note that a track of 0 does *not* mean to turn tracking off;
  1116.         rather, it means to use normal tracking). }
  1117.  
  1118. CONST
  1119.     gxNoTracking                = $80000000;
  1120.  
  1121. { The special "gxNoStake" value is returned by the GXGetLayoutBreakOffset call to
  1122.         indicate the absence of a character offset that is stable with respect to
  1123.         metamorphosis and contextual kerning. }
  1124.     gxNoStake                    = -1;
  1125.  
  1126. { A glyph's behavior with respect to other glyphs on its line is defined in part by its
  1127.         gxBaselineType. These types allow correct alignment of the baselines of all glyphs on
  1128.         the line. }
  1129.     gxRomanBaseline                = 0;
  1130.     gxIdeographicCenterBaseline    = 1;
  1131.     gxIdeographicLowBaseline    = 2;
  1132.     gxHangingBaseline            = 3;
  1133.     gxMathBaseline                = 4;
  1134.     gxLastBaseline                = 31;
  1135.     gxNumberOfBaselineTypes        = 32;
  1136.     gxNoOverrideBaseline        = 255;
  1137.  
  1138.     
  1139. TYPE
  1140.     gxBaselineType = LONGINT;
  1141.  
  1142.     gxBaselineDeltas = ARRAY [0..31] OF Fixed;
  1143.  
  1144. { gxJustificationPriority defines the point during the justification process at which a
  1145.     glyph will begin to receive deltas before and after itself. }
  1146.  
  1147. CONST
  1148.     gxKashidaPriority            = 0;
  1149.     gxWhiteSpacePriority        = 1;
  1150.     gxInterCharPriority            = 2;
  1151.     gxNullJustificationPriority    = 3;
  1152.     gxNumberOfJustificationPriorities = 4;
  1153.  
  1154.     
  1155. TYPE
  1156.     gxJustificationPriority = CHAR;
  1157.  
  1158. { gxJustificationFlags are used to control which fields of a gxWidthDeltaRecord are to
  1159.         be overridden and which are not if a gxPriorityJustificationOverride or
  1160.         gxGlyphJustificationOverride (qq.v.) is specified. }
  1161.  
  1162. CONST
  1163.     gxOverridePriority            = $8000;                        { use priority value from override }
  1164.     gxOverrideLimits            = $4000;                        { use limits values from override }
  1165.     gxOverrideUnlimited            = $2000;                        { use unlimited flag from override }
  1166.     gxUnlimitedGapAbsorption    = $1000;                        { glyph can take unlimited gap }
  1167.     gxJustificationPriorityMask    = $000F;                        { justification priority }
  1168.     gxAllJustificationFlags        = $F00F;
  1169.  
  1170.     
  1171. TYPE
  1172.     gxJustificationFlags = INTEGER;
  1173.  
  1174. { The directional behavior of a glyph can be overridden using a gxDirectionOverride. }
  1175.  
  1176. CONST
  1177.     gxNoDirectionOverride        = 0;
  1178.     gxImposeLeftToRight            = 1;
  1179.     gxImposeRightToLeft            = 2;
  1180.     gxImposeArabic                = 3;
  1181.  
  1182.     
  1183. TYPE
  1184.     gxDirectionOverride = INTEGER;
  1185.  
  1186. { gxRunControlFlags describe the nonparametric layout options contained in a gxStyle. }
  1187.  
  1188. CONST
  1189.     gxNoLigatureSplits            = $80000000;
  1190.     gxNoCaretAngle                = $40000000;
  1191.     gxImposeWidth                = $20000000;
  1192.     gxNoCrossKerning            = $10000000;
  1193.     gxNoOpticalAlignment        = $08000000;
  1194.     gxForceHanging                = $04000000;
  1195.     gxNoSpecialJustification    = $02000000;
  1196.     gxDirectionOverrideMask        = $00000003;
  1197.     gxAllRunControlFlags        = $FE000003;
  1198.  
  1199.     
  1200. TYPE
  1201.     gxRunControlFlags = LONGINT;
  1202.  
  1203. { gxHighlightType is used to distinguish various highlighting methods, both in terms of
  1204.         character offset based vs. visual based, and in terms of angled sides vs. non-angled
  1205.         sides. }
  1206.  
  1207. CONST
  1208.     gxHighlightStraight            = 0;                            { straight-edged simple highlighting }
  1209.     gxHighlightAverageAngle        = 1;                            { takes average of two edge angles }
  1210.  
  1211.     
  1212. TYPE
  1213.     gxHighlightType = LONGINT;
  1214.  
  1215. { gxCaretType is used to control whether the caret that is returned from GXGetLayoutCaret
  1216.         is a split caret or a (keyboard-syncronized) single caret. }
  1217.  
  1218. CONST
  1219.     gxSplitCaretType            = 0;                            { returns Mac-style split caret (default) }
  1220.     gxLeftRightKeyboardCaret    = 1;                            { single caret in left-right position }
  1221.     gxRightLeftKeyboardCaret    = 2;                            { single caret in right-left position }
  1222.  
  1223.     
  1224. TYPE
  1225.     gxCaretType = LONGINT;
  1226.  
  1227. { gxLayoutOffsetState describes the characteristics of a given gxByteOffset in some
  1228.         layout. It is returned by the GXGetOffsetGlyphs call. Note that the
  1229.         gxOffsetInsideLigature value is returned in addition to the 8/16 (or invalid)
  1230.         indication. }
  1231.  
  1232. CONST
  1233.     gxOffset8_8                    = 0;
  1234.     gxOffset8_16                = 1;
  1235.     gxOffset16_8                = 2;
  1236.     gxOffset16_16                = 3;
  1237.     gxOffsetInvalid                = 4;
  1238.  
  1239.     gxOffsetInsideLigature        = $8000;
  1240.  
  1241.     
  1242. TYPE
  1243.     gxLayoutOffsetState = INTEGER;
  1244.  
  1245. { gxLayoutOptionsFlags are single-bit flags contained in a gxLayoutOptions record. We
  1246.         also define here some utility constants that are useful in setting various fields in
  1247.         the gxLayoutOptions record. }
  1248.  
  1249. CONST
  1250.     gxNoLayoutOptions            = 0;
  1251.     gxLineIsDisplayOnly            = $00000001;
  1252.     gxAllLayoutOptionsFlags        = gxLineIsDisplayOnly;
  1253.     gxMaxRunLevel                = 15;
  1254.     gxFlushLeft                    = 0;
  1255.     gxFlushCenter                = $20000000;
  1256.     gxFlushRight                = $40000000;
  1257.     gxNoJustification            = 0;
  1258.     gxFullJustification            = $40000000;
  1259.  
  1260.     
  1261. TYPE
  1262.     gxLayoutOptionsFlags = LONGINT;
  1263.  
  1264. { A gxRunFeature describes a feature and a level for that feature. }
  1265.     gxRunFeature = RECORD
  1266.         featureType:            gxRunFeatureType;
  1267.         featureSelector:        gxRunFeatureSelector;
  1268.     END;
  1269.  
  1270. { A gxWidthDeltaRecord contains all of the information needed to describe the behavior of one
  1271.         class of glyphs during the justification process. }
  1272.     gxWidthDeltaRecord = RECORD
  1273.         beforeGrowLimit:        Fixed;                                    { ems AW can grow by at most on LT }
  1274.         beforeShrinkLimit:        Fixed;                                    { ems AW can shrink by at most on LT }
  1275.         afterGrowLimit:            Fixed;                                    { ems AW can grow by at most on RB }
  1276.         afterShrinkLimit:        Fixed;                                    { ems AW can shrink by at most on RB }
  1277.         growFlags:                gxJustificationFlags;                    { flags controlling grow case }
  1278.         shrinkFlags:            gxJustificationFlags;                    { flags controlling shrink case }
  1279.     END;
  1280.  
  1281. { A gxPriorityJustificationOverride contains an array of WidthDeltaRecords, one for each
  1282.         gxJustificationPriority. }
  1283.     gxPriorityJustificationOverride = RECORD
  1284.         deltas:                    ARRAY [0..3] OF gxWidthDeltaRecord; { overrides for each of the priorities }
  1285.     END;
  1286.  
  1287. { A gxGlyphJustificationOverride contains a gxWidthDeltaRecord that is to be used for a
  1288.         specific glyph in a specific run (this limitation is because glyphcodes vary by font). }
  1289.     gxGlyphJustificationOverride = RECORD
  1290.         glyph:                    gxGlyphcode;
  1291.         override:                gxWidthDeltaRecord;
  1292.     END;
  1293.  
  1294. { gxRunControls contains flags, shifts, imposed widths and overrides for a run. }
  1295. { NOTE: a value of "gxNoTracking" (see above) in track disables tracking }
  1296.     gxRunControls = RECORD
  1297.         flags:                    gxRunControlFlags;
  1298.         beforeWithStreamShift:    Fixed;
  1299.         afterWithStreamShift:    Fixed;
  1300.         crossStreamShift:        Fixed;
  1301.         imposedWidth:            Fixed;
  1302.         track:                    Fixed;
  1303.         hangingInhibitFactor:    Fract;
  1304.         kerningInhibitFactor:    Fract;
  1305.         decompositionAdjustmentFactor: Fixed;
  1306.         baselineType:            gxBaselineType;
  1307.     END;
  1308.  
  1309. { A gxGlyphSubstitution describes one client-provided substitution that occurs after all
  1310.         other automatic glyph changes have happened. }
  1311.     gxGlyphSubstitution = RECORD
  1312.         originalGlyph:            gxGlyphcode;                            { Whenever you see this glyph... }
  1313.         substituteGlyph:        gxGlyphcode;                            { ...change it to this one. }
  1314.     END;
  1315.  
  1316. { gxKerningAdjustmentFactors specify an adjustment to automatic kerning. The adjustment
  1317.         is ax + b where x is the automatic kerning value, a is scaleFactor, and b is
  1318.         adjustmentPointSizeFactor times the run's point size. }
  1319.     gxKerningAdjustmentFactors = RECORD
  1320.         scaleFactor:            Fract;
  1321.         adjustmentPointSizeFactor: Fixed;
  1322.     END;
  1323.  
  1324. { A gxKerningAdjustment identifies with- and cross-stream kerning adjustments
  1325.         for specific glyph pairs. }
  1326.     gxKerningAdjustment = RECORD
  1327.         firstGlyph:                gxGlyphcode;
  1328.         secondGlyph:            gxGlyphcode;
  1329.         withStreamFactors:        gxKerningAdjustmentFactors;
  1330.         crossStreamFactors:        gxKerningAdjustmentFactors;
  1331.     END;
  1332.  
  1333. { A value of gxResetCrossStreamFactor in crossStreamFactors.adjustmentPointSizeFactor
  1334.         will reset the cross-stream kerning to the baseline. }
  1335.  
  1336. CONST
  1337.     gxResetCrossStreamFactor    = $80000000;
  1338.  
  1339. { gxLayoutHitInfo contains the output from the GXHitTestLayout call. }
  1340.  
  1341. TYPE
  1342.     gxLayoutHitInfo = RECORD
  1343.         firstPartialDist:        Fixed;
  1344.         lastPartialDist:        Fixed;
  1345.         hitSideOffset:            gxByteOffset;
  1346.         nonHitSideOffset:        gxByteOffset;
  1347.         leadingEdge:            BOOLEAN;
  1348.         inLoose:                BOOLEAN;
  1349.     END;
  1350.  
  1351. { A gxLineBaselineRecord contains the deltas from 0 to all the different baselines for
  1352.         the layout. It can be filled via a call to GetBaselineDeltas (q.v.). }
  1353.     gxLineBaselineRecord = RECORD
  1354.         deltas:                    gxBaselineDeltas;
  1355.     END;
  1356.  
  1357. { The gxLayoutOptions type contains information about the layout characteristics of the
  1358.         whole line. }
  1359.     gxLayoutOptions = RECORD
  1360.         width:                    Fixed;
  1361.         flush:                    Fract;
  1362.         just:                    Fract;
  1363.         flags:                    gxLayoutOptionsFlags;
  1364.         baselineRec:            ^gxLineBaselineRecord;
  1365.     END;
  1366.  
  1367. {$SETC graphicsStreamTypesIncludes := 1}
  1368.  
  1369. CONST
  1370.     gxNewObjectOpcode            = $00;                            { create new object }
  1371.     gxSetDataOpcode                = $40;                            { add reference to current object }
  1372.     gxSetDefaultOpcode            = $80;                            { replace current default with this object }
  1373.     gxReservedOpcode            = $C0;                            { (may be used in future expansion) }
  1374.     gxNextOpcode                = $FF;                            { used by currentOperand field to say opcode is coming }
  1375.  
  1376. { new object types (new object opcode) }
  1377.     gxHeaderTypeOpcode            = $00;                            { byte following new object uses bottom 6 bits for type }
  1378. { gxShape types use values 1 (gxEmptyType) through 13 (gxPictureType) }
  1379.     gxStyleTypeOpcode            = $28;
  1380.     gxInkTypeOpcode                = $29;
  1381.     gxTransformTypeOpcode        = $2A;
  1382.     gxColorProfileTypeOpcode    = $2B;
  1383.     gxColorSetTypeOpcode        = $2C;
  1384.     gxTagTypeOpcode                = $2D;
  1385.     gxBitImageOpcode            = $2E;
  1386.     gxFontNameTypeOpcode        = $2F;
  1387.     gxTrailerTypeOpcode            = $3F;
  1388.  
  1389. { fields of objects (set data opcodes) }
  1390.     gxShapeAttributesOpcode        = 0;
  1391.     gxShapeTagOpcode            = 1;
  1392.     gxShapeFillOpcode            = 2;
  1393.  
  1394.     gxOmitPathPositionXMask        = $C0;
  1395.     gxOmitPathPositionYMask        = $30;
  1396.     gxOmitPathDeltaXMask        = $0C;
  1397.     gxOmitPathDeltaYMask        = $03;
  1398.  
  1399.     gxOmitPathPositionXShift    = 6;
  1400.     gxOmitPathPositionYShift    = 4;
  1401.     gxOmitPathDeltaXShift        = 2;
  1402.     gxOmitPathDeltaYShift        = 0;
  1403.  
  1404.     gxOmitBitmapImageMask        = $C0;
  1405.     gxOmitBitmapWidthMask        = $30;
  1406.     gxOmitBitmapHeightMask        = $0C;
  1407.     gxOmitBitmapRowBytesMask    = $03;
  1408.  
  1409.     gxOmitBitmapImageShift        = 6;
  1410.     gxOmitBitmapWidthShift        = 4;
  1411.     gxOmitBitmapHeightShift        = 2;
  1412.     gxOmitBitmapRowBytesShift    = 0;
  1413.  
  1414.     gxOmitBitmapPixelSizeMask    = $C0;
  1415.     gxOmitBitmapSpaceMask        = $30;
  1416.     gxOmitBitmapSetMask            = $0C;
  1417.     gxOmitBitmapProfileMask        = $03;
  1418.  
  1419.     gxOmitBitmapPixelSizeShift    = 6;
  1420.     gxOmitBitmapSpaceShift        = 4;
  1421.     gxOmitBitmapSetShift        = 2;
  1422.     gxOmitBitmapProfileShift    = 0;
  1423.  
  1424.     gxOmitBitmapPositionXMask    = $C0;
  1425.     gxOmitBitmapPositionYMask    = $30;
  1426.  
  1427.     gxOmitBitmapPositionXShift    = 6;
  1428.     gxOmitBitmapPositionYShift    = 4;
  1429.  
  1430.     gxOmitBitImageRowBytesMask    = $C0;
  1431.     gxOmitBitImageHeightMask    = $30;
  1432.     gxOmitBitImageDataMask        = $08;
  1433.  
  1434.     gxOmitBitImageRowBytesShift    = 6;
  1435.     gxOmitBitImageHeightShift    = 4;
  1436.     gxOmitBitImageDataShift        = 3;
  1437.  
  1438.     gxCopyBitImageBytesOpcode    = $00;
  1439.     gxRepeatBitImageBytesOpcode    = $40;
  1440.     gxLookupBitImageBytesOpcode    = $80;
  1441.     gxRepeatBitImageScanOpcode    = $C0;
  1442.  
  1443.     gxOmitTextCharactersMask    = $C0;
  1444.     gxOmitTextPositionXMask        = $30;
  1445.     gxOmitTextPositionYMask        = $0C;
  1446.     gxOmitTextDataMask            = $02;
  1447.  
  1448.     gxOmitTextCharactersShift    = 6;
  1449.     gxOmitTextPositionXShift    = 4;
  1450.     gxOmitTextPositionYShift    = 2;
  1451.     gxOmitTextDataShift            = 1;
  1452.  
  1453.     gxOmitGlyphCharactersMask    = $C0;
  1454.     gxOmitGlyphLengthMask        = $30;
  1455.     gxOmitGlyphRunNumberMask    = $0C;
  1456.     gxOmitGlyphOnePositionMask    = $02;
  1457.     gxOmitGlyphDataMask            = $01;
  1458.  
  1459.     gxOmitGlyphCharactersShift    = 6;
  1460.     gxOmitGlyphLengthShift        = 4;
  1461.     gxOmitGlyphRunNumberShift    = 2;
  1462.     gxOmitGlyphOnePositionShift    = 1;
  1463.     gxOmitGlyphDataShift        = 0;
  1464.  
  1465.     gxOmitGlyphPositionsMask    = $C0;
  1466.     gxOmitGlyphAdvancesMask        = $20;
  1467.     gxOmitGlyphTangentsMask        = $18;
  1468.     gxOmitGlyphRunsMask            = $04;
  1469.     gxOmitGlyphStylesMask        = $03;
  1470.  
  1471.     gxOmitGlyphPositionsShift    = 6;
  1472.     gxOmitGlyphAdvancesShift    = 5;
  1473.     gxOmitGlyphTangentsShift    = 3;
  1474.     gxOmitGlyphRunsShift        = 2;
  1475.     gxOmitGlyphStylesShift        = 0;
  1476.  
  1477.     gxOmitLayoutLengthMask        = $C0;
  1478.     gxOmitLayoutPositionXMask    = $30;
  1479.     gxOmitLayoutPositionYMask    = $0C;
  1480.     gxOmitLayoutDataMask        = $02;
  1481.  
  1482.     gxOmitLayoutLengthShift        = 6;
  1483.     gxOmitLayoutPositionXShift    = 4;
  1484.     gxOmitLayoutPositionYShift    = 2;
  1485.     gxOmitLayoutDataShift        = 1;
  1486.  
  1487.     gxOmitLayoutWidthMask        = $C0;
  1488.     gxOmitLayoutFlushMask        = $30;
  1489.     gxOmitLayoutJustMask        = $0C;
  1490.     gxOmitLayoutOptionsMask        = $03;
  1491.  
  1492.     gxOmitLayoutWidthShift        = 6;
  1493.     gxOmitLayoutFlushShift        = 4;
  1494.     gxOmitLayoutJustShift        = 2;
  1495.     gxOmitLayoutOptionsShift    = 0;
  1496.  
  1497.     gxOmitLayoutStyleRunNumberMask = $C0;
  1498.     gxOmitLayoutLevelRunNumberMask = $30;
  1499.     gxOmitLayoutHasBaselineMask    = $08;
  1500.     gxOmitLayoutStyleRunsMask    = $04;
  1501.     gxOmitLayoutStylesMask        = $03;
  1502.  
  1503.     gxOmitLayoutStyleRunNumberShift = 6;
  1504.     gxOmitLayoutLevelRunNumberShift = 4;
  1505.     gxOmitLayoutHasBaselineShift = 3;
  1506.     gxOmitLayoutStyleRunsShift    = 2;
  1507.     gxOmitLayoutStylesShift        = 0;
  1508.  
  1509.     gxOmitLayoutLevelRunsMask    = $80;
  1510.     gxOmitLayoutLevelsMask        = $40;
  1511.  
  1512.     gxOmitLayoutLevelRunsShift    = 7;
  1513.     gxOmitLayoutLevelsShift        = 6;
  1514.  
  1515.     gxInkAttributesOpcode        = 0;
  1516.     gxInkTagOpcode                = 1;
  1517.     gxInkColorOpcode            = 2;
  1518.     gxInkTransferModeOpcode        = 3;
  1519.  
  1520.     gxOmitColorsSpaceMask        = $C0;
  1521.     gxOmitColorsProfileMask        = $30;
  1522.     gxOmitColorsComponentsMask    = $0F;
  1523.     gxOmitColorsIndexMask        = $0C;
  1524.     gxOmitColorsIndexSetMask    = $03;
  1525.  
  1526.     gxOmitColorsSpaceShift        = 6;
  1527.     gxOmitColorsProfileShift    = 4;
  1528.     gxOmitColorsComponentsShift    = 0;
  1529.     gxOmitColorsIndexShift        = 2;
  1530.     gxOmitColorsIndexSetShift    = 0;
  1531.  
  1532.     gxOmitTransferSpaceMask        = $C0;
  1533.     gxOmitTransferSetMask        = $30;
  1534.     gxOmitTransferProfileMask    = $0C;
  1535.  
  1536.     gxOmitTransferSpaceShift    = 6;
  1537.     gxOmitTransferSetShift        = 4;
  1538.     gxOmitTransferProfileShift    = 2;
  1539.  
  1540.     gxOmitTransferSourceMatrixMask = $C0;
  1541.     gxOmitTransferDeviceMatrixMask = $30;
  1542.     gxOmitTransferResultMatrixMask = $0C;
  1543.     gxOmitTransferFlagsMask        = $03;
  1544.  
  1545.     gxOmitTransferSourceMatrixShift = 6;
  1546.     gxOmitTransferDeviceMatrixShift = 4;
  1547.     gxOmitTransferResultMatrixShift = 2;
  1548.     gxOmitTransferFlagsShift    = 0;
  1549.  
  1550.     gxOmitTransferComponentModeMask = $80;
  1551.     gxOmitTransferComponentFlagsMask = $40;
  1552.     gxOmitTransferComponentSourceMinimumMask = $30;
  1553.     gxOmitTransferComponentSourceMaximumMask = $0C;
  1554.     gxOmitTransferComponentDeviceMinimumMask = $03;
  1555.  
  1556.     gxOmitTransferComponentModeShift = 7;
  1557.     gxOmitTransferComponentFlagsShift = 6;
  1558.     gxOmitTransferComponentSourceMinimumShift = 4;
  1559.     gxOmitTransferComponentSourceMaximumShift = 2;
  1560.     gxOmitTransferComponentDeviceMinimumShift = 0;
  1561.  
  1562.     gxOmitTransferComponentDeviceMaximumMask = $C0;
  1563.     gxOmitTransferComponentClampMinimumMask = $30;
  1564.     gxOmitTransferComponentClampMaximumMask = $0C;
  1565.     gxOmitTransferComponentOperandMask = $03;
  1566.  
  1567.     gxOmitTransferComponentDeviceMaximumShift = 6;
  1568.     gxOmitTransferComponentClampMinimumShift = 4;
  1569.     gxOmitTransferComponentClampMaximumShift = 2;
  1570.     gxOmitTransferComponentOperandShift = 0;
  1571.  
  1572.     gxStyleAttributesOpcode        = 0;
  1573.     gxStyleTagOpcode            = 1;
  1574.     gxStyleCurveErrorOpcode        = 2;
  1575.     gxStylePenOpcode            = 3;
  1576.     gxStyleJoinOpcode            = 4;
  1577.     gxStyleDashOpcode            = 5;
  1578.     gxStyleCapsOpcode            = 6;
  1579.     gxStylePatternOpcode        = 7;
  1580.     gxStyleTextAttributesOpcode    = 8;
  1581.     gxStyleTextSizeOpcode        = 9;
  1582.     gxStyleFontOpcode            = 10;
  1583.     gxStyleTextFaceOpcode        = 11;
  1584.     gxStylePlatformOpcode        = 12;
  1585.     gxStyleFontVariationsOpcode    = 13;
  1586.     gxStyleRunControlsOpcode    = 14;
  1587.     gxStyleRunPriorityJustOverrideOpcode = 15;
  1588.     gxStyleRunGlyphJustOverridesOpcode = 16;
  1589.     gxStyleRunGlyphSubstitutionsOpcode = 17;
  1590.     gxStyleRunFeaturesOpcode    = 18;
  1591.     gxStyleRunKerningAdjustmentsOpcode = 19;
  1592.     gxStyleJustificationOpcode    = 20;
  1593.  
  1594.     gxOmitDashAttributesMask    = $C0;
  1595.     gxOmitDashShapeMask            = $30;
  1596.     gxOmitDashAdvanceMask        = $0C;
  1597.     gxOmitDashPhaseMask            = $03;
  1598.  
  1599.     gxOmitDashAttributesShift    = 6;
  1600.     gxOmitDashShapeShift        = 4;
  1601.     gxOmitDashAdvanceShift        = 2;
  1602.     gxOmitDashPhaseShift        = 0;
  1603.  
  1604.     gxOmitDashScaleMask            = $C0;
  1605.  
  1606.     gxOmitDashScaleShift        = 6;
  1607.  
  1608.     gxOmitPatternAttributesMask    = $C0;
  1609.     gxOmitPatternShapeMask        = $30;
  1610.     gxOmitPatternUXMask            = $0C;
  1611.     gxOmitPatternUYMask            = $03;
  1612.  
  1613.     gxOmitPatternAttributesShift = 6;
  1614.     gxOmitPatternShapeShift        = 4;
  1615.     gxOmitPatternUXShift        = 2;
  1616.     gxOmitPatternUYShift        = 0;
  1617.  
  1618.     gxOmitPatternVXMask            = $C0;
  1619.     gxOmitPatternVYMask            = $30;
  1620.  
  1621.     gxOmitPatternVXShift        = 6;
  1622.     gxOmitPatternVYShift        = 4;
  1623.  
  1624.     gxOmitJoinAttributesMask    = $C0;
  1625.     gxOmitJoinShapeMask            = $30;
  1626.     gxOmitJoinMiterMask            = $0C;
  1627.  
  1628.     gxOmitJoinAttributesShift    = 6;
  1629.     gxOmitJoinShapeShift        = 4;
  1630.     gxOmitJoinMiterShift        = 2;
  1631.  
  1632.     gxOmitCapAttributesMask        = $C0;
  1633.     gxOmitCapStartShapeMask        = $30;
  1634.     gxOmitCapEndShapeMask        = $0C;
  1635.  
  1636.     gxOmitCapAttributesShift    = 6;
  1637.     gxOmitCapStartShapeShift    = 4;
  1638.     gxOmitCapEndShapeShift        = 2;
  1639.  
  1640.     gxOmitFaceLayersMask        = $C0;
  1641.     gxOmitFaceMappingMask        = $30;
  1642.  
  1643.     gxOmitFaceLayersShift        = 6;
  1644.     gxOmitFaceMappingShift        = 4;
  1645.  
  1646.     gxOmitFaceLayerFillMask        = $C0;
  1647.     gxOmitFaceLayerFlagsMask    = $30;
  1648.     gxOmitFaceLayerStyleMask    = $0C;
  1649.     gxOmitFaceLayerTransformMask = $03;
  1650.  
  1651.     gxOmitFaceLayerFillShift    = 6;
  1652.     gxOmitFaceLayerFlagsShift    = 4;
  1653.     gxOmitFaceLayerStyleShift    = 2;
  1654.     gxOmitFaceLayerTransformShift = 0;
  1655.  
  1656.     gxOmitFaceLayerBoldXMask    = $C0;
  1657.     gxOmitFaceLayerBoldYMask    = $30;
  1658.  
  1659.     gxOmitFaceLayerBoldXShift    = 6;
  1660.     gxOmitFaceLayerBoldYShift    = 4;
  1661.  
  1662.     gxColorSetReservedOpcode    = 0;
  1663.     gxColorSetTagOpcode            = 1;
  1664.  
  1665.     gxColorProfileReservedOpcode = 0;
  1666.     gxColorProfileTagOpcode        = 1;
  1667.  
  1668.     gxTransformReservedOpcode    = 0;
  1669.     gxTransformTagOpcode        = 1;
  1670.     gxTransformClipOpcode        = 2;
  1671.     gxTransformMappingOpcode    = 3;
  1672.     gxTransformPartMaskOpcode    = 4;
  1673.     gxTransformToleranceOpcode    = 5;
  1674.  
  1675.     gxTypeOpcode                = 0;
  1676.     gxSizeOpcode                = 1;
  1677.  
  1678. { used by currentOperand when currentOperation is gxNextOpcode }
  1679. {    format of top byte:
  1680. xx yyyyyy    xx == 0x00, 0x40, 0x80, 0xC0: defines graphics operation (see gxGraphicsOperationOpcode)
  1681.             yyyyyy == size of operation in bytes
  1682.             if (yyyyyy == 0), byte size follows. If byte following == 0, word size follows; if == 0, long follows
  1683.             word and long, if present, are specified in high-endian order (first byte is largest magnitude)
  1684.             
  1685. format of byte following size specifiers, if any:
  1686. xx yyyyyy    xx == 0x00, 0x40, 0x80, 0xC0: defines compression level (0 == none, 0xC0 == most)
  1687.             exact method of compression is defined by type of data
  1688.             yyyyyy == data type selector (0 to 63): see gxGraphicsNewOpcode, __DataOpcode
  1689. }
  1690.     gxOpcodeShift                = 6;
  1691.     gxObjectSizeMask            = $3F;
  1692.     gxCompressionShift            = 6;
  1693.     gxObjectTypeMask            = $3F;
  1694.     gxBitImageOpcodeMask        = $C0;
  1695.     gxBitImageCountMask            = $3f;
  1696.     gxBitImageOpcodeShift        = 6;
  1697.  
  1698.     gxNoCompression                = 0;
  1699.     gxWordCompression            = 1;
  1700.     gxByteCompression            = 2;
  1701.     gxOmitCompression            = 3;
  1702.     gxCompressionMask            = $03;
  1703.  
  1704. {    the following structures define how primitives without a public geometry
  1705.     are stored (their format mirrors that of the New call to create them)    }
  1706.  
  1707. TYPE
  1708.     gxFlatFontName = RECORD
  1709.         name:                    SInt8; { unsigned char }                { gxFontName }
  1710.         platform:                SInt8; { unsigned char }                { gxFontPlatform }
  1711.         script:                    SInt8; { unsigned char }                { gxFontScript }
  1712.         language:                SInt8; { unsigned char }                { gxFontLanguage }
  1713.         length:                    INTEGER;                                { byte length }
  1714.     END;
  1715.  
  1716.  
  1717. CONST
  1718.     gxFlatFontListItemTag        = 'flst';
  1719.  
  1720.  
  1721. TYPE
  1722.     gxFlatFontListItem = RECORD
  1723.         fontID:                    gxFont;                                    {** if we get rid of this, remove #include "font types.h", above }
  1724.         name:                    SInt8; { unsigned char }                { gxFontName }
  1725.         platform:                SInt8; { unsigned char }                { gxFontPlatform }
  1726.         script:                    SInt8; { unsigned char }                { gxFontScript }
  1727.         language:                SInt8; { unsigned char }                { gxFontLanguage }
  1728.         length:                    INTEGER;                                { byte length of the name that follows }
  1729.         glyphCount:                INTEGER;                                { CountFontGlyphs or 0 if gxFontGlyphsFlatten is false }
  1730.         axisCount:                INTEGER;                                { CountFontVariations or 0 if gxFontVariationsFlatten is false }
  1731.         variationCount:            INTEGER;                                { number of bitsVariationPairs that follow the (optional) glyphBits }
  1732.     END;
  1733.  
  1734.     gxFlatFontList = RECORD
  1735.         count:                    LONGINT;
  1736.         items:                    ARRAY [0..0] OF gxFlatFontListItem;
  1737.     END;
  1738.  
  1739.     gxFlattenHeader = RECORD
  1740.         version:                Fixed;
  1741.         flatFlags:                SInt8; { unsigned char }
  1742.         padding:                SInt8;
  1743.     END;
  1744.  
  1745.  
  1746. CONST
  1747.     gxOmitPictureShapeMask        = $C0;
  1748.     gxOmitOverrideStyleMask        = $30;
  1749.     gxOmitOverrideInkMask        = $0C;
  1750.     gxOmitOverrideTransformMask    = $03;
  1751.  
  1752.     gxOmitPictureShapeShift        = $6;
  1753.     gxOmitOverrideStyleShift    = $4;
  1754.     gxOmitOverrideInkShift        = $2;
  1755.     gxOmitOverrideTransformShift = $0;
  1756.  
  1757. {$SETC gxSynonymTags := 1}
  1758.     gxPostScriptTag                = 'post';
  1759.     gxPostControlTag            = 'psct';
  1760.  
  1761.     gxNoSave                    = 1;                            { don't do save-restore around PS data }
  1762.     gxPSContinueNext            = 2;                            { next shape is continuation of this shape's PS -- only obeyed if gxNoSave is true }
  1763.  
  1764.  
  1765. TYPE
  1766.     gxPostControl = RECORD
  1767.         flags:                    LONGINT;                                { PostScript state flags }
  1768.     END;
  1769.  
  1770.  
  1771. CONST
  1772.     gxDashSynonymTag            = 'sdsh';
  1773.  
  1774.  
  1775. TYPE
  1776.     gxDashSynonym = RECORD
  1777.         size:                    LONGINT;                                { number of elements in array }
  1778.         dashLength:                ARRAY [0..0] OF Fixed;                    { Array of dash lengths }
  1779.     END;
  1780.  
  1781.  
  1782. CONST
  1783.     gxLineCapSynonymTag            = 'lcap';
  1784.  
  1785.     gxButtCap                    = 0;
  1786.     gxRoundCap                    = 1;
  1787.     gxSquareCap                    = 2;
  1788.     gxTriangleCap                = 3;
  1789.  
  1790. { gxLine cap type }
  1791.     
  1792. TYPE
  1793.     gxLineCapSynonym = LONGINT;
  1794.  
  1795.  
  1796. CONST
  1797.     gxCubicSynonymTag            = 'cubx';
  1798.  
  1799.     gxIgnoreFlag                = $0000;                        { Ignore this word, get next one }
  1800.     gxLineToFlag                = $0001;                        { Draw a gxLine to gxPoint following this flag }
  1801.     gxCurveToFlag                = $0002;                        { Draw a gxCurve through the 3 points following this flag }
  1802.     gxMoveToFlag                = $0003;                        { Start a new contour at the gxPoint following this flag }
  1803.     gxClosePathFlag                = $0004;                        { Close the contour }
  1804.  
  1805.     gxCubicInstructionMask        = $000F;                        { low four bits are gxPoint instructions }
  1806.  
  1807. { Low four bits are instruction (moveto, lineto, curveto, closepath) }
  1808.     
  1809. TYPE
  1810.     gxCubicSynonymFlags = INTEGER;
  1811.  
  1812.  
  1813. CONST
  1814.     gxPatternSynonymTag            = 'ptrn';
  1815.  
  1816.     gxHatch                        = 0;
  1817.     gxCrossHatch                = 1;
  1818.  
  1819.  
  1820. TYPE
  1821.     gxPatternSynonym = RECORD
  1822.         patternType:            LONGINT;                                { one of the gxPatterns: gxHatch or gxCrossHatch }
  1823.         angle:                    Fixed;                                    { angle at which pattern is drawn }
  1824.         spacing:                Fixed;                                    { distance between two parallel pattern lines }
  1825.         thickness:                Fixed;                                    { thickness of the pattern }
  1826.         anchorPoint:            gxPoint;                                { gxPoint with with respect to which pattern position is calculated }
  1827.     END;
  1828.  
  1829.  
  1830. { $ALIGN RESET}
  1831. { $POP}
  1832.  
  1833. {$ENDC} {__GXTYPES__}
  1834.  
  1835.  IMPLEMENTATION
  1836.  END.
  1837.  
  1838.